<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>12-静态方法的holdReady方法</title>
    <script src="../js/jquery-3.5.1.js"></script>
    <script>
        // $.holdReady(true); 作用：暂停ready执行
        $.holdReady(true);
        $(document).ready(function() {
            alert("ready");
        });
    </script>
</head>
<body>
    <button>回复ready事件</button>
    <script>
        var btn = document.getElementsByTagName("button")[0];
        btn.onclick = function () {
            alert("btn");
            $.holdReady(false); // 恢复ready执行
        }
    </script>
</body>
</html>